<?php
class page_base {

/******** Gestion des variables *******************/
private $titre;
private $style=array('style');
private $corps;
private $page;
private $header;
private $footer;
private $nav;

public function __construct($p) {
$this->titre = $p;
}

/******** Gestion des setters *******************/
public function __set($propriete, $valeur) {
switch ($propriete) {
case 'style' : {
$this->style[count($this->style)+1] = $valeur;
break;
}
case 'corps' : {
$this->corps = $valeur;
break;
}

case 'titre' : {
$this->titre = $valeur;
break;
}

case 'page' : {
$this->page = $valeur;
break;
}

case 'header' : {
$this->header = $valeur;
break;
}

case 'footer' : {
$this->footer = $valeur;
break;
}

case 'nav' : {
$this->nav = $valeur;
break;
}
}
}
/******** Gestion du titre *******************/
private function affiche_titre() {
echo $this->titre;
}

/******** Gestion du corps *******************/
private function affiche_corps() {
echo $this->corps;
}

/*************Gestion des styles *********************/
private function affiche_style()
{
	foreach ($this->style as $s)
	{
		echo "<link rel='stylesheet' href='css/".$s.".css' />\n";
	}
}

/************** Affichage du pied de la page ***************************/
private function affiche_footer() {
?>
<footer>
				<p>Site de l'&eacute;cole de danse de Beaucouz&eacute;</p>				
				<p>Mise en page Les Clubbers &copy; 2013
				<a href="http://chevrollier.e-lyco.fr/">Chevrollier</a> </p>
</footer>
<?php
}


/************* Affichage de l'entete de la page **************************/
private function affiche_header() {
?>
	<header>
      <div id="logo">
        <div id="logo_text">
          <h1><a href="index.php"><span class="logo_colour1">Ecole de danse de </span><span class="logo_colour">Beaucouz&eacute;</span></a></h1>
        </div>
      </div>
      <nav>
        <ul class="sf-menu" id="nav">
          <li class="selected"><a href="index.php">Accueil</a></li>
          <li><a href="equipe.php">L'&eacute;quipe</a></li>
          <li><a href="mention.php">Mentions l&eacute;gales</a></li>
          <li><a href="inscription_site.php">Inscriptions</a></li>
          <li><a href="#">Album photo</a>
          <ul>
			   <li><a href="2013.php">Gala de danse 2013</a></li>
               <li><a href="2012.php">Gala de Danse 2012</a></li>
               <li><a href="2011.php">Gala de danse 2011</a></li>
               <li><a href="2010.php">Gala de danse 2010</a></li>
              <li><a href="MCL.php">Inauguration MCL</a></li>
          </ul>
          </li>   
          <li><a href="contact.php">Nous contacter</a></li>
        </ul>
      </nav>
    </header>
    <div id="site_content">
      <ul id="images">
        <li><img src="images/1.jpeg" width="600" height="300" alt="photo_one" /></li>
        <li><img src="images/2.jpg" width="600" height="300" alt="photo_two" /></li>
        <li><img src="images/3.jpg" width="600" height="300" alt="photo_three" /></li>
        <li><img src="images/4.jpg" width="600" height="300" alt="photo_four" /></li>
        <li><img src="images/5.jpg" width="600" height="300" alt="photo_five" /></li>
        <li><img src="images/6.jpg" width="600" height="300" alt="photo_photo_dark" /></li>
      </ul>
<?php
}


/******************** Affichage du menu de navigation ********************/
protected function affiche_menu() {
?>

            
<?php
}

/******************** Fonction permettant l'affichage de la page **************/
public function affiche() {
?>
<!DOCTYPE html>
<html lang='fr'>
<head>
<title>
<?php $this->affiche_titre(); ?>
</title>
<meta name="description" content="website description" />
  <meta name="keywords" content="website keywords, website keywords" />
  <meta http-equiv="content-type" content="text/html;"/>
  <link rel="stylesheet" type="text/css" href="css/style.css" />
  <!-- modernizr enables HTML5 elements and feature detects -->
  <script type="text/javascript" src="js/modernizr-1.5.min.js"></script>
<meta charset="utf-8" />
<?php $this->affiche_style(); ?>
</head>
<body>
<?php
	$this->affiche_header();
	$this->affiche_menu();
	$this->affiche_corps();
	$this->affiche_footer();
	?>
</body>

</html>
<?php
}
}
?>